import * as PIXI from 'pixi.js'
import { elementModule } from '@renderer/utils/bundle'
export default async (data: Wx.Card.Data): Promise<PIXI.Container<PIXI.ContainerChild>> => {
  // 属性(费用)
  const consumeContainer = new PIXI.Container()
  const elemental = await elementModule(data, 0)
  elemental.anchor.set(0.5)
  consumeContainer.addChild(elemental)
  const consume = new PIXI.Text({
    text: data.consume,
    style: {
      fontFamily: 'RZFont',
      fontSize: 90,
      fill: 0xffffff,
      align: 'center',
      stroke: {
        color: 0x000000,
        width: 4,
      },
    },
  })
  consume.anchor.set(0.5)
  consumeContainer.addChild(consume)
  consumeContainer.scale.set(0.58)
  consumeContainer.position.set((105 * 0.58 - 353) / 2 + 5, (105 * 0.58 - 506) / 2 + 5)
  return consumeContainer
}
